package com.wangp.mywrite.springboot;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author: wp
 * @date: 2023/5/25 15:28:38
 * @desc:
 **/
@Component
public class MessageListener {

    @KafkaListener(topics = "wp")
    public void onMessage(ConsumerRecord<String,String> record){
        System.out.println("已完成短信发送：" + record.value());
    }
}
